package com.ybkj.daijia.server.service;

import com.ybkj.daijia.common.Result;
import com.ybkj.daijia.page.Page;
import com.ybkj.daijia.server.gasstation.GasPrice;
import com.ybkj.daijia.server.gasstation.GasStation;
import com.ybkj.daijia.server.gasstation.Order;
import com.ybkj.daijia.server.gasstation.OrderTemp;
import com.ybkj.daijia.server.gasstation.PaymentsRecord;
import com.ybkj.daijia.server.gasstation.PaymentsRecord.RecordType;
import com.ybkj.daijia.server.mc.Passenger;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface GasStationService {

    List<GasPrice> findGasPriceByGasStation(Long gsId);

    Page<GasStation> queryStationByParams(String name, String serviceNo, Long companyId,
        String address, String contactsPhone, Integer page, Integer rows);

    Result<GasStation> create(GasStation gasStation);

    GasStation queryById(Long id);

    Result<GasPrice> saveGasPrice(Long id, BigDecimal price);

    Result<GasPrice> saveGasPriceStraightDown(Long id, String straightDown);

    Result<GasPrice> saveGasPriceSort(Long id, Integer sort);

    String delete(Long id);

    GasStation findGasStationLogin(String serviceNo, String contactsPhone, String password);

    Page<PaymentsRecord> queryPaymentsRecord(
        Long gsId, String gasStation, Date start, Date end, Integer page, Integer limit);

    Result<PaymentsRecord> savePaymentsRecord(
        Long gsId, BigDecimal money, String memo, String operating, RecordType recordType,
        Integer rcType);

    Map<String, Object> update(GasStation gasStation);

    Order findLastOrderByPassenger(Long id);

    Result<Order> paymentOrder(Order order, Passenger passenger);

    Result<OrderTemp> paymentOrderTemp(OrderTemp orderTemp);

    Map<String, Object> changePassword(Long id, String password);

    Map<String, Object> changeFreeze(Long id, Boolean freeze);

    OrderTemp findOneOrderTemp(Long orderTempId);

    Result<OrderTemp> orderTempTreament(Long orderTempId);

}
